package glassline.interfaces;

import glassline.Glass;
import glassline.SensorAgent;

public interface Conveyor {

	/**
	 * True if the conveyor has a popup at the very beginning
	 */
	public abstract boolean hasBeginningPopup();

	//messages	
	/**
	 * Sent by the previous conveyor, robot, shuttle, etc.
	 * Delivers glass to conveyor
	 * @param g glass to be delivered
	 */
	public abstract void msgHereIsGlass(Glass g);

	/**
	 * Sent by a sensor, indicates glass just triggered sensor by moving over it
	 * Not sent when glass leaves a sensor
	 * @param sensor who sensed the glass
	 */
	public abstract void msgSensedGlass(Sensor sensor);

	/**
	 * Sent by popup if its delivering glass from the conveyor and as a result,
	 * all of its workstations will be full
	 * @param workstationsFull true if all workstations are fll
	 * @param popup who is delivering the glass
	 */
	public abstract void msgIAmUp(boolean workstationsFull, Popup popup);

	/**
	 * Sent by popup whenever it is down
	 */
	public abstract void msgIAmDown(Popup popup);

	/**
	 * Sent by popup if it is going up (and workstations are not full)
	 */
	public abstract void msgIAmUp(Popup popup);

	/**
	 * Sent by popup when it is giving glass back to conveyor
	 * @param g which glass
	 * @param popup which popup
	 */
	public abstract void msgHereIsGlass(Glass g, Popup popup);

}